projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a5c435
)
Plugged memory leak in gtk_style_finalize (destroy the ->background[] patterns).
author
Tristan Van Berkom
<tristan.van.berkom@gmail.com>
Sun, 16 Jan 2011 11:17:52 +0000
(20:17 +0900)
committer
Tristan Van Berkom
<tristan.van.berkom@gmail.com>
Sun, 16 Jan 2011 11:17:52 +0000
(20:17 +0900)
gtk/gtkstyle.c
patch
|
blob
|
history
diff --git
a/gtk/gtkstyle.c
b/gtk/gtkstyle.c
index f9abf8d9c391e13dbf4da442003eaa2fe71f7551..9fd3bfbe6fce0700936f8b87481bf96591cf58f0 100644
(file)
--- a/
gtk/gtkstyle.c
+++ b/
gtk/gtkstyle.c
@@
-513,6
+513,7
@@
gtk_style_finalize (GObject *object)
{
GtkStyle *style = GTK_STYLE (object);
GtkStylePrivate *priv = GTK_STYLE_GET_PRIVATE (style);
+ gint i;
g_return_if_fail (style->attach_count == 0);
@@
-559,6
+560,12
@@
gtk_style_finalize (GObject *object)
g_object_unref (priv->context);
}
+ for (i = 0; i < 5; i++)
+ {
+ if (style->background[i])
+ cairo_pattern_destroy (style->background[i]);
+ }
+
G_OBJECT_CLASS (gtk_style_parent_class)->finalize (object);
}